import { Callout } from 'nextra/components';

# ZkLogin

Utilities for working with zkLogin. Currently contains functionality to create and parse zkLogin
signatures and compute zkLogin addresses.

<Callout type="info">
	Note: `@mysten/zklogin` package contains more utilities to help with computing address etc.
</Callout>

To parse a serialized zkLogin signature

```typescript
import { parseZkLoginSignature } from '@mysten/sui/zklogin';

const parsedSignature = await parseZkLoginSignature('BQNNMTY4NjAxMzAyO....');
```

Use `getZkLoginSignature` to serialize a zkLogin signature.

```typescript
import { getZkLoginSignature } from '@mysten/sui/zklogin';

const serializedSignature = await getZkLoginSignature({ inputs, maxEpoch, userSignature });
```

To compute the address for a given address seed and iss you can use `computeZkLoginAddressFromSeed`

```typescript
import { computeZkLoginAddressFromSeed } from '@mysten/sui/zklogin';

const address = await computeZkLoginAddressFromSeed(0n, 'https://accounts.google.com');
```

To use zkLogin inside a multisig, see the [Multisig Guide](../typescript/cryptography/multisig.mdx)
for more details.
